<template>
	<view>
		<view class="padding cu-chat bg-white margin-bottom-sm">
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					报修类型
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.repaireName"
						   type="text" readonly="readonly"/>
				</view>
			</tui-list-cell>
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					<view class="tui-title self-flex-title">报修楼类型</view>
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.buildingName"
						   type="text" readonly="readonly"/>
				</view>
			</tui-list-cell>
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					<view class="tui-title self-flex-title">报修地点</view>
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.buildingDetailName"
						   type="text" readonly="readonly"/>
				</view>
			</tui-list-cell>
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					<view class="tui-title self-flex-title">报修物品</view>
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.goodsName"
						   type="text"/>
				</view>
			</tui-list-cell>
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					<view class="tui-title self-flex-title">房间号</view>
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.roomNum"
						   type="text"/>
				</view>
			</tui-list-cell>
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					<view class="tui-title self-flex-title">备注</view>
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.repaireDes"
						   type="text"/>
				</view>
			</tui-list-cell>
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					<view class="tui-title self-flex-title">报修人</view>
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.userName"
						   type="text"/>
				</view>
			</tui-list-cell>
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					<view class="tui-title self-flex-title">维修人</view>
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.repairemanName"
						   type="text"/>
				</view>
			</tui-list-cell>
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					<view class="tui-title self-flex-title">接单时间</view>
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.getRepaireTime"
						   type="text"/>
				</view>
			</tui-list-cell>
			<tui-list-cell :hover="false">
				<view class="tui-line-cell self-flex">
					<view class="tui-title self-flex-title">完成时间</view>
					<input class="tui-input self-flex-content" maxlength="50" name="name" v-model="dataItem.overTime"
						   type="text"/>
				</view>
			</tui-list-cell>

			<view class="tui-btn-box" v-if="dataItem.repaireStatus==2">
				<button class="btn-primary" hover-class="btn-hover" @click="addEvaluate" type="primary">评论</button>
			</view>
			<!--<navigator url="/pages/user/orderDetail/addEvaluate/addEvaluate?rid=${this.rid}" hover-class="navigator-hover">-->
				<!--&lt;!&ndash;<button type="default">评论</button>&ndash;&gt;-->
				<!--<button class="btn-primary" hover-class="btn-hover" type="primary">评论</button>-->
			<!--</navigator>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">报修类型：{{dataItem.repaireName}}</view>-->
			<!--</view>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">报修楼类型：{{dataItem.buildingName}}</view>-->
			<!--</view>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">报修地点：{{dataItem.buildingDetailName}}</view>-->
			<!--</view>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">报修物品：{{dataItem.goodsName}}</view>-->
			<!--</view>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">房间号：{{dataItem.roomNum}}</view>-->
			<!--</view>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">备注：{{dataItem.repaireDes}}</view>-->
			<!--</view>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">报修人：{{dataItem.userName}}</view>-->
			<!--</view>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">维修人：{{dataItem.repairemanName}}</view>-->
			<!--</view>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">接单时间：{{dataItem.getRepaireTime}}</view>-->
			<!--</view>-->
			<!--<view class="self-direction-row">-->
				<!--<view class="basis-df radius text-xl">完成时间：{{dataItem.overTime}}</view>-->
			<!--</view>-->
		</view>
		<!--<view class="class-line grid col-3 margin-bottom text-center">-->
			<!--<view class="item-center padding">框名称</view>-->
			<!--<view class="item-center padding">框数量</view>-->
			<!--<view class="item-center padding">实际数量</view>-->
		<!--</view>-->
		<!--<item-line :dataList="dataList"></item-line>-->
		<!--<view>-->
			<!--<uni-fab-->
					<!--:pattern="pattern"-->
					<!--:content="content"-->
					<!--:horizontal="horizontal"-->
					<!--:vertical="vertical"-->
					<!--:direction="direction"-->
					<!--@trigger="trigger"-->
			<!--&gt;</uni-fab>-->
		<!--</view>-->
		<!--<view slot="btn-area" class="btn-area">-->
			<!--<right-angle-btn btnText="保存"-->
							 <!--class="btn-area-item"-->
							 <!--btnType="primary"-->
							 <!--@click="save"-->
			<!--&gt;</right-angle-btn>-->
		<!--</view>-->
	</view>
</template>

<script>
    import { getOrderDetail } from '@/api/user/index'
    import tuiListCell from "@/components/list-cell/list-cell"

	export default {
        components: {
            tuiListCell,
        },
		data() {
			return {
                rid: '',
                dataItem: {}
			}
		},
        /**
         * 下拉刷新
         */
        onPullDownRefresh: function () {
            this.init(this.rid);
        },
        onLoad(option) {
            // 获取订单号，
            this.rid = option.rid
            this.init(this.rid)

        },
		methods: {
      addEvaluate() {

        uni.navigateTo({
          url: `/pages/user/orderDetail/addEvaluate/addEvaluate?rid=${this.rid}`,
          animationType: 'pop-in',
          animationDuration: 300
        });
			},
            init(params) {
                getOrderDetail(this.rid).then(res => {
                    console.log("dataItem",this.dataItem)
                    this.dataItem = res.data
					console.log("dataItem",this.dataItem)
                })
            },

		}
	}
</script>

<style lang="css" scoped>
	@import "edit.css";
</style>


